﻿using System.Web.Mvc;

namespace MsForgeReboot.Web.Areas.ControlPanel {
    public class ControlPanelAreaRegistration : AreaRegistration {
        public override string AreaName {
            get {
                return "ControlPanel";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context) {
            
            context.MapRoute(
                 "ControlPanel_CMS_default",
                 "ControlPanel/CMS/{action}/{id}",
                 new { controller = "CMS", action = "Index", id = UrlParameter.Optional },
                 new[] { "MsForgeReboot.Web.Areas.ControlPanel.Controllers" });

            context.MapRoute(
                 "ControlPanel_urlPointer_default",
                 "ControlPanel/{controller}/{action}/{urlPointer}",
                 new { controller = "Home", action = "Index" },
                 new[] { "MsForgeReboot.Web.Areas.ControlPanel.Controllers" });

            context.MapRoute(
                 "ControlPanel_default",
                 "ControlPanel/{controller}/{action}/{id}",
                 new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                 new[] { "MsForgeReboot.Web.Areas.ControlPanel.Controllers" });
          
        }
    }
}
